package com.fs.mapper;

import com.fs.entity.ProductGallery;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品图片展示数据访问层
 * 用于删除与商品相关联的图片
 */
@Mapper
public interface ProductGalleryMapper {

    /**
     * 根据商品ID列表批量删除图片记录
     */

    void deleteByProductIds(@Param("ids") List<Long> ids);

    void insert(ProductGallery gallery);

    void updateSelective(ProductGallery gallery);

    void deleteByIds(@Param("ids") List<Long> ids);

    List<ProductGallery> selectByProductId(@Param("productId") Long productId);
}
